package redis

import "errors"

var (
	// ErrEmptyHost is an error that indicates no redis host is set.
	ErrEmptyHost = errors.New("empty redis host")
	// ErrEmptyType is an error that indicates no redis type is set.
	ErrEmptyType = errors.New("empty redis type")
	// ErrEmptyKey is an error that indicates no redis key is set.
	ErrEmptyKey = errors.New("empty redis key")
)



type (
	// A RedisConf is a redis config.
	RedisConf struct {
		Host string `json:"host"`
		DB   int `json:"db,omitempty"`
		Auth string `json:"auth,omitempty"`
	}
)


func (rc RedisConf) NewRedis() *Redis {
	return New(rc.Host, rc.DB, rc.Auth)
}